From bf4d3b4ba1f5cd8c353dbef7d406fa8174e2dd40 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 21 Aug 2003 11:36:08 +0000 Subject: [PATCH] (term_init): Fix previous change --- src/term.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/term.c b/src/term.c index 506fc16ffb3..bae059ea439 100644 --- a/src/term.c +++ b/src/term.c @@ -2229,14 +2229,12 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.", #endif } -#ifdef TERMINFO - area = (char *) xmalloc (buffer_size); -#else +#ifndef TERMINFO if (strlen (buffer) >= buffer_size) abort (); - - area = (char *) xmalloc (strlen (buffer)); + buffer_size = strlen (buffer); #endif + area = (char *) xmalloc (buffer_size); TS_ins_line = tgetstr ("al", address); TS_ins_multi_lines = tgetstr ("AL", address); -- 2.30.2